-- GENERATED SPELL FOR [Bash'ir Reckoner] --


function spell0_23332(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(35570,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23332', 2323, 1)
end

function spell1_23332(pUnit, Event) --@Dematerialize Armor,n/a--
pUnit:FullCastSpellOnTarget(40935,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23332', 8282, 1)
end

function spell2_23332(pUnit, Event) --@Warp,n/a--
pUnit:FullCastSpellOnTarget(40949,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23332', 1348, 1)
end

function Sorts_23332(pUnit, Event)
local choix_sorts_23332 = math.random(0, 2)
if choix_sorts_23332 == 0 then
pUnit:RegisterEvent('spell0_23332', 1, 1)
end
if choix_sorts_23332 == 1 then
pUnit:RegisterEvent('spell1_23332', 1, 1)
end
if choix_sorts_23332 == 2 then
pUnit:RegisterEvent('spell2_23332', 1, 1)
end
end

function mob23332_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23332', math.random(1500, 3000), 1)
end

function mob23332_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23332_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23332_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23332, 1, 'mob23332_Action')
RegisterUnitEvent(23332, 2, 'mob23332_Leave')
RegisterUnitEvent(23332, 3, 'mob23332_Kill')
RegisterUnitEvent(23332, 4, 'mob23332_Die')
